﻿<Window x:Class="cau2.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Loaded="Window_Loaded"
        Title="Quản lý sinh viên"  Width="820px">
    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="30"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
        </Grid.RowDefinitions>
        <Label Content="QUẢN LÝ THÔNG TIN"  FontSize="20" FontFamily="Times New Roman" Margin="165,0,133,0" Foreground="#FFEB3F26" HorizontalAlignment="Center"></Label>
        <Grid Grid.Row="1" Margin="10,15,10,15">
            <Grid.RowDefinitions>
                <RowDefinition Height="30"></RowDefinition>
                <RowDefinition Height="30"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>

                <ColumnDefinition Width="auto" MinWidth="100"></ColumnDefinition>
                <ColumnDefinition Width="auto" MinWidth="150"></ColumnDefinition>
                <ColumnDefinition Width="auto" MinWidth="100"></ColumnDefinition>
                <ColumnDefinition Width="auto" MinWidth="150"></ColumnDefinition>
                <ColumnDefinition Width="auto" MinWidth="100"></ColumnDefinition>
                <ColumnDefinition Width="auto" MinWidth="150"></ColumnDefinition>



            </Grid.ColumnDefinitions>
            <Label Content="Ma SV" HorizontalAlignment="Left" Margin="35,2,0,0" VerticalAlignment="Top" Width="87" Height="26"/>
            <Label Content="Ma Khoa" Grid.Row="1" HorizontalAlignment="Left" Margin="35,2,0,0" VerticalAlignment="Top" Height="26" Width="57"/>
            <TextBox Name="txtmasv" HorizontalAlignment="Left" Height="25" Margin="4,3,0,0" Grid.Row="0" Grid.Column="1" TextWrapping="Wrap"  VerticalAlignment="Top" Width="150"/>
            <TextBox Name="txtmakhoa" HorizontalAlignment="Left" Height="23" Margin="4,3,0,0" Grid.Row="1" Grid.Column="1" TextWrapping="Wrap"  VerticalAlignment="Top" Width="150"/>
            <Label Content="Ho SV" HorizontalAlignment="Left"  Grid.Column="2" Margin="5,2,0,2" Width="75"/>
            <Label Content="Ngay Sinh" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Left" Margin="5,2,0,0" VerticalAlignment="Top" Height="26" Width="75"/>
            <TextBox Name="txthosv" HorizontalAlignment="Left" Height="23" Margin="3,3,0,0" Grid.Row="0" Grid.Column="3" TextWrapping="Wrap"  VerticalAlignment="Top" Width="150"/>
            <TextBox Name="txtngsinh" HorizontalAlignment="Left" Height="23" Margin="3,3,0,0" Grid.Row="1" Grid.Column="3" TextWrapping="Wrap"  VerticalAlignment="Top" Width="150"/>
            <Label Content="Ten SV"  HorizontalAlignment="Left"  Grid.Column="4" Margin="5,2,0,0" VerticalAlignment="Top" Height="26" Width="68"/>
            <Label Content="Gioi Tinh"  Grid.Row="1" Grid.Column="4" HorizontalAlignment="Left" Margin="5,2,0,0" VerticalAlignment="Top" Height="26" Width="68"/>
            <TextBox Name="txtten" Height="23" Margin="73,5,15,0" Grid.Row="0" Grid.Column="4" TextWrapping="Wrap"  VerticalAlignment="Top" Width="150"/>
            <TextBox Name="txtgt" HorizontalAlignment="Left" Height="23" Margin="73,4,0,0" Grid.Row="1" Grid.Column="4" TextWrapping="Wrap" VerticalAlignment="Top" Width="150"/>


        </Grid>
        <DataGrid Name="datagrid" Grid.Row="2" AutoGenerateColumns="False" SelectionChanged="datagrid_SelectionChanged">
            <DataGrid.Columns>
                <DataGridTextColumn Header="Mã sinh viên" Width="120" Binding="{Binding masv}"></DataGridTextColumn>
                <DataGridTextColumn Header="Họ sinh viên" Width="140" Binding="{Binding hosv}"></DataGridTextColumn>
                <DataGridTextColumn Header="Tên sinh viên" Width="140" Binding="{Binding tensv}"></DataGridTextColumn>
                <DataGridTextColumn Header="Ngày sinh" Width="150" Binding="{Binding ngaysinh}"></DataGridTextColumn>
                <DataGridTextColumn Header="Giới tính" Width="120" Binding="{Binding gioitinh}"></DataGridTextColumn>
                <DataGridTextColumn Header="Mã khoa" Width="140" Binding="{Binding makhoa}"></DataGridTextColumn>
            </DataGrid.Columns>
        </DataGrid>

        <Button Click="btnthem_Click" Content="Thêm" Grid.Row="3" Height="23"  Margin="8,4,427,0" Name="btnthem" VerticalAlignment="Top" Width="68" />
        <Button Click="btnsua_Click" Content="Sửa" Grid.Row="3" Height="23"  Margin="93,4,349,0" Name="btnsua" VerticalAlignment="Top" Width="61" />
        <Button Click="btnxoa_Click" Content="Xóa" Grid.Row="3" Height="23"  Margin="174,4,270,0" Name="btnxoa" VerticalAlignment="Top" Width="59" />
        <Button Click="btnluu_Click" Content="Lưu" Grid.Row="3" Height="23"  Margin="253,4,184,0" Name="btnluu" VerticalAlignment="Top" Width="66" />
        <Button Click="btnhuy_Click"  Content="Hủy" Grid.Row="3" Height="23"  Margin="334,3,102,0" Name="btnhuy" VerticalAlignment="Top" Width="67" />
        <Button Click="btnthoat_Click" Content="Thoát" Grid.Row="3" Height="23" Margin="414,3,25,0" Name="btnthoat" VerticalAlignment="Top" Width="64" />

    </Grid>
</Window>
